$("#placeholder").on("click", function (event) {
    var elem = $(event.target);

    if (elem.is("[class*=data-line]")) {
        var line = elem.attr('class').match(/data-line-(\d+)/)[1];
        afx.moveCursorTo(line);
    } else {
        var line = elem.closest("[class*=data-line]").attr('class').match(/data-line-(\d+)/)[1];
        afx.moveCursorTo(line);
    }
});